package com.cloud.wms.ui.returned.entity;

import android.os.Parcel;
import android.os.Parcelable;

import com.cloud.wms.ui.inside.entity.TransferCommodityEntity;

import java.util.List;

/**
 * Created by FC on 2021/5/21.
 * Desc：退货面单查询发货单实体
 */
public class InvoiceEntity implements Parcelable {
    private String invoiceID;
    private String invoiceCode;
    private String deliveryTime;
    private String shippingAddress;
    private List<TransferCommodityEntity> commodityList;

    public InvoiceEntity() {

    }

    public String getInvoiceID() {
        return invoiceID;
    }

    public void setInvoiceID(String invoiceID) {
        this.invoiceID = invoiceID;
    }

    public String getInvoiceCode() {
        return invoiceCode;
    }

    public void setInvoiceCode(String invoiceCode) {
        this.invoiceCode = invoiceCode;
    }

    public String getDeliveryTime() {
        return deliveryTime;
    }

    public void setDeliveryTime(String deliveryTime) {
        this.deliveryTime = deliveryTime;
    }

    public String getShippingAddress() {
        return shippingAddress;
    }

    public void setShippingAddress(String shippingAddress) {
        this.shippingAddress = shippingAddress;
    }

    public List<TransferCommodityEntity> getCommodityList() {
        return commodityList;
    }

    public void setCommodityList(List<TransferCommodityEntity> commodityList) {
        this.commodityList = commodityList;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.invoiceID);
        dest.writeString(this.invoiceCode);
        dest.writeString(this.deliveryTime);
        dest.writeString(this.shippingAddress);
        dest.writeTypedList(this.commodityList);
    }

    protected InvoiceEntity(Parcel in) {
        this.invoiceID = in.readString();
        this.invoiceCode = in.readString();
        this.deliveryTime = in.readString();
        this.shippingAddress = in.readString();
        this.commodityList = in.createTypedArrayList(TransferCommodityEntity.CREATOR);
    }

    public static final Creator<InvoiceEntity> CREATOR = new Creator<InvoiceEntity>() {
        @Override
        public InvoiceEntity createFromParcel(Parcel source) {
            return new InvoiceEntity(source);
        }

        @Override
        public InvoiceEntity[] newArray(int size) {
            return new InvoiceEntity[size];
        }
    };
}
